package com.bwie.controller;

import com.bwie.common.domain.Type;
import com.bwie.common.result.Result;
import com.bwie.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：Minxiao Hao
 * @Description:
 * @name：TypeController
 * @Date：2024/11/4 11:44
 */
@RestController
@RequestMapping("/type")
public class TypeController {
    @Autowired
    private TypeService typeService;

    /**
     * 类型 下拉框
     * @return
     */
    @PostMapping("/findTypeList")
    public Result<Type> findTypeList(){
        List<Type> list = typeService.findTypeList();
        Result result = Result.success(list);
        return result;
    }
}
